all: ising2d

build:
	make C=ifort

debug:
	make C=ifortDEBUG

zeus:
	make C=ifortZEUS


ifeq ($(C),ifort)
FC=ifort
FCFLAGS= -c -O3  -132 -I/opt/intel/composerxe/mkl/include
FCCFLAGS= -c -O3
FBFLAGS=  -O3  -132
LIBS=  -mkl -static-intel
else ifeq ($(C),ifortDEBUG)
FC=ifort
FCFLAGS= -c -132 -traceback -O0 -check all -fpe0 -warn -traceback -debug extended -I/opt/intel/composerxe/mkl/include
FCCFLAGS= -c -O0 -Wall -g
FBFLAGS=  -O0 -132
LIBS=  -mkl -static-intel
else ifeq ($(C),ifortZEUS)
BASEDIR=/people/gjkolasi
FC=ifort
FCFLAGS= -c -O3  -132
FCCFLAGS= -c -O3
FBFLAGS=  -O3  -132
LIBS=  -mkl -static-intel
endif



ising2d: main.f90 modinip.o modising2d.o
		$(FC) $(FBFLAGS)  main.f90 *.o $(LIBS)  -o $@
modinip.o: modinip.F90
		$(FC) $(FCFLAGS) modinip.F90 -o $@
modising2d.o: modising2d.f90
		$(FC) $(FCFLAGS) modising2d.f90 -o $@



clean:
		rm *.o *.mod

